#打印一百以内完数
def is_perfect(n):
    sum = 0
    for x in range(1, n):
        if n % x == 0:
            sum += x
    return sum == n
for n in range(1, 100):
    if is_perfect(n):
        print(n)